const { $util } = getApp();
const app = getApp();
Page({

  /**
   * 页面的初始数据
   */
  data: {
    useTabbar: !(app.tabbarindex === 0 && app.siteInfo.tabbar_type === '1'),
  },
  onShow() {
    this.loadMenuList();
  },
  navigateTo(e) {
    const { url } = e.currentTarget.dataset;
    wx.navigateTo({
      url,
    });
  },
  loadMenuList() {
    $util.request({
      url: 'entry/wxapp/base.perm.menu',
      data: {
        visit_local: 'app',
      },
      showLoading: false,
      success: (res) => {
        this.setData({
          menus: res.menus,
        });
      },
    });
  },
  onShareAppMessage() {
    return {
      path: '/ws_party_const/pages/manage/index',
    };
  },
});
